#include <iostream>
int main(){
    int p1,p2,answer=0;
    std::cout << "enter:";
    std::cin >> p1 >> p2;
    if ( p1 > p2 )
    {
        while( p1 >= p2 )
        {
            answer += p1--;
        }
    }else if( p1 < p2){
        while( p1 <= p2 )
        {
            answer += p1++;
        }
    }else if( p1 = p2){
            answer = p1;
    }
    std::cout << "output:" << answer << std::endl;
    return 0;
}
